use cmake to run clazy.
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Sat, 19 Mar 2022 20:34:56 +0000 (14:34 -0600)
committertsteven4 <13596209+tsteven4@users.noreply.github.com>
Sat, 19 Mar 2022 20:34:56 +0000 (14:34 -0600)
this avoids warnings in Qt headers.

we also build both the CLI and GUI.

tools/build_extra_tests.sh

index 05ad8f5c13391aa572bc8d331e5ca650201fe8ca..550cf93eae47668d3337a2a1fa5cb4224510a298 100755 (executable)
@@ -28,10 +28,13 @@ make clean
 make -j 3
 make check
 
+# run clazy on both gpsbabel and gpsbabelfe.
+# unlike qmake, cmake uses system includes for Qt which quiets warnings
+# from the Qt headers.
 export CLAZY_CHECKS=level0,level1,no-non-pod-global-static,no-qstring-ref
-qmake -spec linux-clang "CONFIG+=debug" "QMAKE_CXX=clazy"
-make clean
-make -j 3 2>&1 | tee clazy.log
+cmake . -DCMAKE_CXX_COMPILER=clazy -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug"
+cmake --build . --target clean
+cmake --build . 2>&1 | tee clazy.log
 if grep -- '-Wclazy' clazy.log; then
   exit 1
 else